home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #14
/
Monster Media No. 14 (April 1996) (Monster Media, Inc.).ISO
/
utils
/
da_150.zip
/
DA.DOC
< prev
next >
Wrap
Text File
|
1996-01-18
|
26KB
|
549 lines
┌──────────────────────────┐
│ DA - Version 1.5 │
╞══════════════════════════╡
│ From ConsulTech │
│ Programmed by Jim Wilson │
├──────────────────────────┤
│ Copyright (C) 1993-96 │
│ All Rights Reserved │
└──────────────────────────┘
┌──────────────┐
│ GENERAL INFO │
└──────────────┘
DA, short for Delete All, is a nifty little DOS utility that, as it's
name implies, allows you to delete all of the file(s) specified on the
command line. The file names can contain wildcards (* and/or ?) and can
be on different drives or sub-directories. You can use as many file
specifications as will fit on the DOS command line and DA will delete
them all.
As you will certainly see from actually using DA it's purpose appears,
at least initially, to be quite simple. However, it will quickly
become indispensable and will soon be one of your most valuable
utilities, especially if you work as a technician or consultant.
┌──────────┐
│ FEATURES │
└──────────┘
DA is loaded with features to make it's usage and functionality
greater. Through the CAREFUL use (remember, this program is designed
to delete files) of command line options you can have DA do an awful
lot. Some of DA's main features are:
■ Delete multiple files with a single command, not multiple
commands like DOS's Del utility.
■ Delete files from multiple locations in one shot; drives,
directories, etc. - even network drives (if you have the
appropriate permissions to do so, of course).
■ Erase only files with 0 bytes, like all those Windows .tmp
files scattered about.
■ Remove only files with certain attributes set.
■ Remove files regardless of their attributes; Hidden, Read
Only or System, with or without confirmation.
■ Erase not only the files but the sub-directories too.
■ Selective delete files with confirmation.
■ The ability to stop the deletions while the program is
working.
■ Special "wipe out" option makes it impossible to use an
unerase program to retrieve any information from an erased
file.
Quite a number of advanced features for such a small program (Da.Exe
is only 9K). With a little bit of assembler mixed in with all my hand
coded Pascal, along with a LOT of optimization on my part, I was able
to make DA the smallest, fastest program possible. I think you'll
agree.
┌─────────────────┐
│ LIMITED LICENSE │
└─────────────────┘
ConsulTech hereby grants you a limited license to use this software
for evaluation purposes for a period not to exceed thirty (30) days.
If you intend to continue using this software after the evaluation
period, you MUST make a registration payment to ConsulTech.
Individuals are granted permission by ConsulTech to copy the DA
diskette for their own use (for evaluation purposes) or for other
individuals to evaluate, ONLY when the following conditions are met:
■ The DA package - including all related program files and
documentation files - cannot be modified in ANY way and must
be distributed as a complete package, without exception.
■ No price or other compensation may be charged for the DA
package. A distribution fee may be charged for the cost of
a diskette or for shipping and handling, as long as the
total (per disk) does not exceed $10.00.
■ The DA package CANNOT be distributed as part of some other
inclusive package without a written agreement from
ConsulTech.
■ Licensee shall not use, copy, rent, lease, sell, modify,
decompile, disassemble, reverse engineer, or transfer the
licensed program except as provided in this agreement. Any
such unauthorized use shall result in immediate and
automatic termination of this license.
Network, multi-user, and multi-copy (more then one person at a time in
different locations, i.e. field service technicians) licenses are
available for a nominal fee. Additionally, licenses for the inclusion
of DA with other software packages, commercial or ShareWare, are also
available. Please contact ConsulTech for further information.
┌──────────────┐
│ REGISTRATION │
└──────────────┘
The current registration fee for DA is only $10.00. This fee includes
all postage and handling costs.
Fill out the order form that the file Register.Exe prints and send it
to the address below. Please make certain that ALL checks or money
orders are made out to Jim Wilson.
Mailing Address: ConsulTech
Jim Wilson
4 Scranton Pkwy
Oxford, NJ 07863
Your $10.00 registration fee entitles you, the registrant, to unlimited
usage of DA on as many computers as you own or work on provided that
the program CAN NOT be used simultaneously at two or more locations.
With your $10.00 registration fee you will also be added to the mailing
list so that when the next major version is released you will
automatically be sent a diskette.
┌────────────┐
│ DISCLAIMER │
└────────────┘
DA is supplied as is. The author disclaims all warranties, expressed or
implied, including, without limitation, the warranties of
merchantability and of fitness for any purpose. The author assumes no
liability for damages, direct or consequential, which may result from
the use of DA or for the loss of information resulting in erased or
deleted files/programs. Hopefully, that satisfies all the legal eagles!
┌───────────────┐
│ PROGRAM USAGE │
└───────────────┘
You can use DA directly from the command line or a DOS session in
either OS/2 or Windows. (Be careful of what files you erase when your
in OS/2 or Windows. Certain 0 byte and .tmp files are needed and will
cause program failures if erased while still necessary.)
The syntax for DA is: C:\>da <options> <filespec>
C:\>da <filespec> <options>
C:\>da <options> <filespec> <options>
C:\>da <filespec> <options> <filespec>
Basically, you can use whatever combination of options and filespecs
interspersed however you'd like. You can also precede each option with
either a / or a - character (making it easier for all us Unix types).
And finally, DA is not case sensitive -- everything on the command line
can be in upper case, lower case or any combination of both. Yup, it's
that simple.
Now, for all the lazy people out there (me included!) DA has some very
detailed file name completion abbreviations. These abbreviations will
expand various command line shortcuts into fully qualified file names,
saving you a lot of time and keystrokes. The 3 supported abbreviation
types are:
. (a single period)
This gets expanded into the equivalent "*.*", just like some DOS
commands do. This means that "da ." would be automatically expanded
into "da *.*".
.ext (file extension without a file name)
This gets expanded into the equivalent "*.ext". This means that "da
c:\temp\.bak" would be automatically expanded into "da
c:\temp\*.bak".
name* or name*. (file name with wildcards, but no extension)
These get expanded into the equivalent "name*.*". This means that
"da c:\backup\no*", or "da c:\backup\no*.", would be expanded
automatically into "da c:\backup\no*.*".
Please note, however, that when using these expansion abbreviations you
need to be *VERY* careful about how you type, and what you type. For
instance; If you wanted to delete a file called "junk.exe" but you
happened to type "junk .exe" (notice the space between the k in junk
and the .exe) DA would first try and locate a file called "junk"
without an extension and delete it, if one existed, but then would
proceed to delete EVERY FILE with an extension of ".exe". Also be aware
that if you typed "no* .com" instead of "no*.com" (again, notice the
single space) DA would delete every file with a name that began with
"no", regardless of the files extension, and every file that had an
extension of ".com" as well. The difference between these commands is
really quite minor -- just a single space in both instances -- and very
easy to type, but produces extremely different results. This imparts DA
with a tremendous amount of power and flexibility, but it does come at
a price. Caveat emptor!
Of course if you do type something wrong DA incorporates two safety
valves, for just such an occasion (the other, the /C option, is
discussed below and is something you should use quite liberally until
you get very familiar with how DA works). If you realize that what your
deleting is not what you had intended simply striking any key while DA
is working will cause an immediate and unconditional exit of the
program. A message will appear informing you of the fact that DA was
interrupted by user request.
The command line options currently supported by DA are:
/?,/H - A small [H]elp screen listing all of the recognized
options. If no command line options are given you
will get this screen.
/A[ahrs0?] - Delete by [A]ttributes. This option allows you to
select files that only match specific attribute(s).
For instance, if you wanted to remove files that had
the archive attribute set you would use /AA; if you
wanted to remove those that had the system and read
only attributes set you would use /ASR; etc. You may
select any/all of the acceptable choices; (A)rchive,
(H)idden, (S)ystem, (R)ead only or (0) none. (This
last setting can be used to delete files that have no
attributes set and, for obvious reasons, won't do
anything when used in conjunction with any other
attribute flag except for the ?. Both the ? and 0
options are discussed in detail below.) Note that
this option (/A) can be used in conjunction with all
others, including file specifications, so that you
can be quite pointed about the type of files you wish
to delete.
In DA's default mode the attributes chosen are
cumulative, meaning that selecting /AHR will only
match files that have the hidden AND read only
attributes, and not those that have just hidden OR
readonly set. However, adding a ? anywhere in the
list of attributes alters DA's behavior so that a
file with ANY of the selected attributes set would
match.
And finally, the 0 option will allow you to delete
files that have absolutely no attributes set. This
last option may prove to be rather dubious but I
decided to include it for the sake of completeness.
(All this makes complete sense I'm sure! Actually,
it's a lot easier than it sounds. Try it, you'll
see.)
/C - [C]onfirm deletions. In it's default mode, DA will
just erase all requested files. This option causes DA
to stop and ask you for confirmation on each file
that matches your filespec(s). The acceptable answers
are [Y]es, [N]o, [Q]uit or [A]ll. The first 3 options
are self-explanatory. The 4th, [A]ll, simply means
that for all remaining matching file(s) this
confirmation will be disabled and they will be
immediately erased. Note that this does not affect
the /E option above (see below).
/D - Delete corresponding [D]irectory. If this option is
selected DA will delete all the files and the
directories that are specified on the command line.
Note that this will delete EVERY directory you list
on the command line, if they're empty of course. To
selectively delete directories (or files) use the /C
option as well.
/E - Deletes [E]very file, regardless of their attributes.
In it's default mode, DA will ask whether or not you
wish to delete Hidden, System, or Read Only files.
This option turns that verification off and will
delete all files. If this option is not used, and DA
encounters a file with one of the above mentioned
attributes set, it will inform you of that fact and
then ask you for permission to delete it. The
acceptable answers are [Y]es, [N]o, [Q]uit or [A]ll.
The first 3 options are self-explanatory. The 4th,
[A]ll, simply means that for all remaining matching
file(s) this confirmation will be disabled and they
will be immediately erased. Note that this does not
affect the /C option (see above).
/W - [W]ipe out the file. Under normal circumstances all
programs that delete files don't completely remove
them from the hard drive, they're merely
"deactivated". Because of that fact, files can
usually be unerased if you have the right software
(that's how Peter Norton got so famous). This option
destroys the contents of the data and zero's out the
file making it's recovery COMPLETELY impossible - a
nice feature for sensitive data. While it is indeed
possible to use an unerase program to bring the file
"back" it will contain 0 bytes of data (everything
originally in it will be gone).
/0 - Delete files that are zero bytes in length. A lot of
programs, Windows being a prime example, have a
tendency to leave 0 byte files behind. Using this
option will delete all files that are 0 bytes in
length, regardless of their name or extension. When
using this option make certain that you DON'T INCLUDE
A FILE SPEC unless you want those files deleted as
well. Typing "da *.* /0" and "da /0" will give you
decidedly different results!!
┌────────────────┐
│ USAGE EXAMPLES │
└────────────────┘
At this point a few examples would probably be quite helpful. Pay
particular attention to the ease of use and how you can inter-mix any
and all options however you'd like. This gives DA a phenomenal amount
of power, but it should be used with caution.
Example 1: C:\WINDOWS>da /0
Configured this way, DA would delete ONLY the files that are 0
bytes in size in the C:\WINDOWS subdirectory, regardless of the
files name.
Example 2: C:\WINDOWS>da . /0 (or da *.* /0)
Configured this way, DA would delete all the files that are 0
bytes in size too. But, unlike Example 1, this would also delete
EVERY SINGLE FILE in the C:\WINDOWS subdirectory. TAKE NOTE: The
difference in the command lines between Example 1 and Example 2 is
subtle but highly important! ** YOU HAVE BEEN WARNED **
Example 3: C:\>da c:\backup\*.bak \old_docs\*.* -d t:\junk\. /w
This one is a biggy. Translated, this line reads "delete all the
.bak files from the C:\BACKUP directory, all the files from the
\OLD_DOCS subdirectory and everything on the network drive
T:\JUNK." Also included in this command are the options to delete
the directories AND to wipe out - make impossible to unerase -
everything DA touches. This command line may look confusing at
first but is actually pretty straight forward. Again, notice how
you can mix and match virtually anything you'd like anyway you'd
like.
Example 4: C:\MISC>da -c -e *.*
This example shows how you would erase all the files in your
C:\MISC subdirectory regardless of their attributes, but asking
for permission first.
Example 5: C:\BACKUP>da -ars -c .bak /e
This example would delete all the files with a .bak extension that
had both the read only AND system attributes set from the C:\BACKUP
subdirectory. It would confirm the deletions first but wouldn't
warn you that the read only and system attributes were set.
Example 6: C:\DOS>da -ahrs? \. /e
This example would delete every file in the root directory of drive
C: that had ANY of the following attributes set: hidden, read only
or system. This would also delete them without warning you that one
of the "protected" attributes was set.
Example 7: C:\>da -c /e a:.xls f:\stuff\old* \temp\~* -aah
This final example really shows some of DA's absolute power. Here,
we are going to delete all the files with an extension of .xls from
the current directory of drive A:, then delete every file from the
F:\STUFF directory that begins with the letters "old" (regardless
of the extension) and lastly remove the Windows temporary files
(those starting with a ~ that have any file name and extension).
Mixed in amongst all of these varying file specs are the options to
delete only files that have the hidden AND archive attributes set
(-aah option) without warning you that any of the protected
attributes -- hidden, system or readonly -- are on (/e option), but
stopping to confirm each file name before it's deleted (-c option).
Now, how's that for power? Think of the possibilities!
┌─────────────────┐
│ VERSION HISTORY │
└─────────────────┘
1.0 - 3/94 Never released. Because this program deletes files
I was too chicken to let a 1.0 version out the
door until I was certain it worked properly!
1.1 - 5/94 Added the /D option to delete sub-[D]irectories.
Added the /0 option to delete files of [0] bytes.
NO BUGS TO FIX! (And you thought all 1.0 software
was garbage, didn't you?)
1.2 - 7/94 Fixed a bug that wouldn't allow DA to erase a
sub-directory if the name was three characters or
less.
Fixed a bug with the displaying of a directory
name when DA couldn't find that directory.
Added the full DOS path and filename to the
displayed "Deleting File:" message.
Speeded up file deletions by approximately 50%.
1.2a- 8/94 Fixed a bug with the displaying of certain messages.
1.3 - 10/94 Fixed a bug which caused DA to ignore the /C
[C]onfirm option for sub-directories, but not for
files (go figure).
Speeded up file deletions by approximately 25%.
Fixed a display bug when you selected [Q]uit from
the [C]onfirm message.
1.3a- 11/94 Fixed a minor display anomaly which caused certain
prompts to over write other information already on
the screen.
1.4 - 6/95 Fixed another minor display anomaly which caused
certain prompts to over write other information
already on the screen. These damn display bugs are
going to be the death of me!
Added the ability to interrupt long or erroneously
executed deletions by hitting any key on the
keyboard.
Enhanced DA's typical Y/N/Q (Yes/No/Quit) prompt
with a new option: A (for All). Now, when
questioned the prompt will be Y/N/Q/A. Selecting A
will cause DA to continue along for *all* of the
remaining files that match your specification(s).
This, essentially, reverses the effects of the /C
command line option and works in conjunction with
the /E option.
Improved the clarity and readability of the error
messages.
1.5 - 1/96 Enhanced the file name completion feature with the
ability to automatically expand .ext filenames
(.bak, .exe, etc.) into their *.ext equivalent
(*.bak, *.exe, etc.) as well as name* or name*.
filenames (con*, auto*., etc.) into their name*.*
equivalent (con*.*, auto*.*, etc.).
Added the ability to delete files by specific
attribute(s). Because this was assigned to the /A
option the previous meaning of that option, which
was to delete [A]ll files regardless of attributes,
has been reassigned to be /E, delete [E]very file.
Fixed a bug that would cause DA to ignore the [A]ll
option when specified from the delete directory
confirm prompt.
Fixed a bug that would cause DA to attempt to
delete the current directory if you specified the
-d option and you had selected files from the
current directory.
Fixed a long standing bug that DA had where it
would sometimes mistake a drives volume label for a
file if you were deleting files from the root
directory. This appears to be a problem with the
Borland libraries, but it was one I was never able
to duplicate with complete accuracy.
┌────────────────┐
│ THINGS TO COME │
└────────────────┘
There aren't too many new features currently planned for DA, primarily
because I can't think of much more it could do. The only thing that is
definitely being added, and has even already been partially coded, is
an option that would allow you to recurse sub-directories with any/all
commands.
For example, suppose you wanted to delete all the .bak files and any
files that were only zero bytes in length on your entire hard drive.
Starting from the root directory you could issue a command that would
look something like "C:\>da *.bak -0 /s" and DA would traverse through
all your directories and delete the requested files. While this would
add more inherent power to the program it would also increase the risk
factor exponentially.
So, how about you? Do you have any nifty ideas for DA? Drop me a letter
and let me know what they are. I'd be more than willing to listen to
your input (especially if it were accompanied by a registration
check!).
╓─────────────────────────────────╖
║ ConsulTech ║
║ Jim Wilson ║
║ 4 Scranton Pkwy ║
║ Oxford, NJ 07863 ║
║ (email: jawilson@ix.netcom.com) ║
╙─────────────────────────────────╜